cmake_minimum_required(VERSION 3.23)
project(gtest_lib)

set(CMAKE_CXX_STANDARD 11)
# 添加子项目
add_subdirectory(googletest)
# 指定gtest的头文件目录
include_directories(googletest/googletest/include gtest_demo/lib/googletest)
# 指定gmock的头文件目录
include_directories(googletest/googlemock/include gtest_demo/lib/googlemock)
add_executable(${PROJECT_NAME} main.cpp)
# 指定将gtest gtest_main两个链接库，链接到gtest01工程中
target_link_libraries(${PROJECT_NAME} gtest gtest_main)